<?php
class LoginForm extends Zend_Form {
	
	public function init() {
		$this->setMethod("POST");
		
		$element = new Zend_Form_Element_Text("email");
		$element->setLabel("Email:");
		$element->setDescription("Login with your email address");
		$element->setRequired(true);
        $element->addValidator(new Zend_Validate_EmailAddress());
        $element->addFilter(new Zend_Filter_HtmlEntities());
        $element->addFilter(new Zend_Filter_StripTags());
        $element->addValidator('NotEmpty');
        $this->addElement($element);
        
        $element = new Zend_Form_Element_Password("password");
        $element->setLabel("Password:");
        $element->setDescription("At least 6 characters");
        $element->addValidator(new Zend_Validate_StringLength(6,100));
        $element->addFilter(new Zend_Filter_HtmlEntities());
        $element->addFilter(new Zend_Filter_StripTags());
        $this->addElement($element);
        
        $element = new Zend_Form_Element_Submit("Login");
        $this->addElement($element);
	}
}

?>